<?php

namespace app\api\validate;

use think\Validate;
use app\common\Error;

class Home extends Validate
{
    protected $rule = [
        'video_id'  => 'require',
        'type_id'   => 'require',
        'type'      => 'require',
        'app_id'  => 'require'
    ];

    protected $message  =   [
        'video_id.require'    => Error::VIDEO_ID_NOT_EXIXTS,
        'type_id.require'     => Error::TYPE_ID_NOT_EXIXTS,
        'type.require'        => Error::TYPE_NOT_EXIXTS,
        'app_id.require'    => '小程序id不能为空'
    ];

    protected $scene = [
        'get_video' => ['video_id'],
        'get_list_by_type' => ['type_id'],
        'type_list' => ['type']
    ];
}